<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   主题：求助：优化程序  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/topic/8576/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466450698: Accept with keywords: (title(0.25):程序,主题,优化,论坛, topn(0.2):RSS订阅,软件应用,定义,热门,帖子,R语言,作者,会员,用户名,主站,新鲜事,红字,版权所有,高手,菜单,函数,楼主,密码,总计,拟合,优化,语句,代码,主题,程序,普通,意思,论坛,模型,讨论区).-->
 </head>
 <body class="topic bbpress single single-topic postid-8576 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    主题：求助：优化程序
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-8576 topic type-topic status-publish hentry" id="post-8576">
        <header class="entry-header">
         <h1 class="entry-title">
          求助：优化程序
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div class="bbp-breadcrumb">
           <p>
            <a class="bbp-breadcrumb-home" href="http://cos.name/cn/">
             COS论坛 | 统计之都
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-root" href="http://cos.name/cn/forums/">
             讨论区
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/software/">
             软件应用
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/software/r-language/">
             S-Plus &amp; R语言
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <span class="bbp-breadcrumb-current">
             求助：优化程序
            </span>
           </p>
          </div>
          <div class="bbp-template-notice info">
           <p class="bbp-topic-description">
            该主题包含 7 条回复，3个帖子，最后由
            <a class="bbp-author-avatar" href="http://cos.name/cn/profile/1/" rel="nofollow" title="查看谢益辉的档案">
             <img src="http://sdn.geekzu.org/avatar/1022d8e6ebc94e8f6bca9a86cebe312a?s=14&amp;d=monsterid&amp;r=g"/>
            </a>
            <a class="bbp-author-name" href="http://cos.name/cn/profile/1/" rel="nofollow" title="查看谢益辉的档案">
             谢益辉
            </a>
            在
            <a href="http://cos.name/cn/topic/8576/#post-237920" title="回复：求助：优化程序">
             8 年, 7 月 之前
            </a>
            更新。
           </p>
          </div>
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 8 个帖子 - 1 到 8（总计 8 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <ul class="forums bbp-replies" id="topic-8576-replies">
           <li class="bbp-header">
            <div class="bbp-reply-author">
             作者
            </div>
            <!-- .bbp-reply-author -->
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-header -->
           <li class="bbp-body">
            <div class="bbp-reply-header" id="post-8576">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月12日 下午7:23
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-8576">
               1 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-8576 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-1 user-id-3028 topic-author post-8576 topic type-topic status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/3028/" rel="nofollow" title="查看environ的档案">
               <img src="http://sdn.geekzu.org/avatar/dc07d89f89e35639443760d48c43015e?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/3028/" rel="nofollow" title="查看environ的档案">
               environ
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               求助：帮忙编写一段循环语句，优化下面的程序。
               <br/>
               程序的主要目的是利用gam拟合模型，然后根据gof函数计算AIC，选取AIC最小是的模型。
              </p>
              <p>
               gof&lt;-function(x,scale)   ##gives exact AIC (see SPLUS)
               <br/>
               {
               <br/>
               {
               <br/>
               family&lt;-x$family
               <br/>
               n&lt;-length(residuals(x))
               <br/>
               if(missing(scale))
               <br/>
               {
               <br/>
               deviance.splus&lt;-function(x)
               <br/>
               {
               <br/>
               if(is.null(w &lt;- x$weights)) sum((x$residuals)^2.)
               <br/>
               else sum(w * x$residuals^2.)
               <br/>
               }
               <br/>
               <br/>
               scale&lt;-function(x)
               <br/>
               {
               <br/>
               famname&lt;-family$family
               <br/>
               if (famname=="binomial" | famname=="poisson") 1
               <br/>
               else deviance.splus(x)/(n-x$nsdf)
               <br/>
               }
               <br/>
               }
               <br/>
               else if (scale==0)
               <br/>
               scale&lt;-deviance.splus(x)/(n-x$nsdf)
               <br/>
               AIC&lt;-x$deviance+2*(n-(n-x$nsdf))*scale(x)
               <br/>
               BIC&lt;-x$deviance+(log(n))*(n-(n-x$nsdf))*scale(x)
              </p>
              <p>
               print(x$call)
               <br/>
               cat("Residual Deviance=",format(round(x$deviance,4)), "\n")
               <br/>
               cat("AIC=", AIC, "BIC=", BIC, "\n")
               <br/>
               }
               <br/>
               }
              </p>
              <p>
               model0&lt;-gam(cvd~as.factor(dow)+s(time),data=beijing,family=quasipoisson
               <br/>
               (link=log))
               <br/>
               model00&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model01&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model02&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model03&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model04&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model05&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model06&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag0.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model01)
               <br/>
               gof(model02)
               <br/>
               gof(model03)
               <br/>
               gof(model04)
               <br/>
               gof(model05)
               <br/>
               gof(model06)
              </p>
              <p>
               model10&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model11&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model12&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model13&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model14&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model15&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model16&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag1.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model11)
               <br/>
               gof(model12)
               <br/>
               gof(model13)
               <br/>
               gof(model14)
               <br/>
               gof(model15)
               <br/>
               gof(model16)
              </p>
              <p>
               model20&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model21&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model22&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model23&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model24&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model25&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model26&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag2.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model21)
               <br/>
               gof(model22)
               <br/>
               gof(model23)
               <br/>
               gof(model24)
               <br/>
               gof(model25)
               <br/>
               gof(model26)
              </p>
              <p>
               model30&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model31&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model32&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model33&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model34&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model35&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model36&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag3.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model31)
               <br/>
               gof(model32)
               <br/>
               gof(model33)
               <br/>
               gof(model34)
               <br/>
               gof(model35)
               <br/>
               gof(model36)
              </p>
              <p>
               model40&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model41&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model42&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model43&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model44&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model45&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model46&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag4.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model41)
               <br/>
               gof(model42)
               <br/>
               gof(model43)
               <br/>
               gof(model44)
               <br/>
               gof(model45)
               <br/>
               gof(model46)
              </p>
              <p>
               model50&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model51&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model52&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model53&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model54&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model55&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model56&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag5.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model51)
               <br/>
               gof(model52)
               <br/>
               gof(model53)
               <br/>
               gof(model54)
               <br/>
               gof(model55)
               <br/>
               gof(model56)
              </p>
              <p>
               model60&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag0.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model61&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag1.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model62&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag2.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model63&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag3.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model64&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag4.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model65&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag5.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               model66&lt;-gam(cvd~as.factor(dow)+s(time)+s(lag6.t)+s(lag6.h),data=beijing,
               <br/>
               family=quasipoisson(link=log))
              </p>
              <p>
               gof(model61)
               <br/>
               gof(model62)
               <br/>
               gof(model63)
               <br/>
               gof(model64)
               <br/>
               gof(model65)
               <br/>
               gof(model66)
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237657">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月13日 上午5:59
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237657">
               2 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237657 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-2 user-id-16553 post-237657 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               <img src="http://sdn.geekzu.org/avatar/8e30e23a1f33d28352030e2459604bd2?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               ddtd
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               这个不知道行不行, 就是需要重新定义lag[k].t 和 lag[j].h
              </p>
              <p>
               for k in 0 to 6
               <br/>
               {
               <br/>
               for j in 0 to 6
               <br/>
               {
               <br/>
               model[i,j]=
               <br/>
               gam(cvd~as.factor(dow)+s(time)+
               <strong class="d4pbbc-bold">
                s(lag[k].t)+s(lag[j].h),
               </strong>
               <br/>
               data=beijing,
               <br/>
               family=quasipoisson(link=log))
               <br/>
               gof(model[i,j])
               <br/>
               (如果需要此时输出,在此加一个输出的函数)
               <br/>
               }
               <br/>
               }
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237658">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月13日 上午6:02
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237658">
               3 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237658 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-3 user-id-16553 post-237658 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               <img src="http://sdn.geekzu.org/avatar/8e30e23a1f33d28352030e2459604bd2?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               ddtd
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               红字的地方是 s(lag
               <em class="d4pbbc-italic">
               </em>
               .t)+s(lag[j].h), 不知道为什么老显示不出来
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237659">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月13日 上午6:03
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237659">
               4 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237659 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-4 user-id-16553 post-237659 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               <img src="http://sdn.geekzu.org/avatar/8e30e23a1f33d28352030e2459604bd2?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               ddtd
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               还是显示不出来…..
               <br/>
               希望楼主明白我的意思
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237660">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月13日 上午6:07
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237660">
               5 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237660 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-5 user-id-16553 post-237660 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               <img src="http://sdn.geekzu.org/avatar/8e30e23a1f33d28352030e2459604bd2?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/16553/" rel="nofollow" title="查看ddtd的档案">
               ddtd
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               我改 lag[k]……
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237663">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月13日 上午7:36
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237663">
               6 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237663 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-6 user-id-3028 topic-author post-237663 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/3028/" rel="nofollow" title="查看environ的档案">
               <img src="http://sdn.geekzu.org/avatar/dc07d89f89e35639443760d48c43015e?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/3028/" rel="nofollow" title="查看environ的档案">
               environ
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               谢谢，我试试看
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237686">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月13日 下午1:06
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237686">
               7 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237686 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-7 user-id-3028 topic-author post-237686 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/3028/" rel="nofollow" title="查看environ的档案">
               <img src="http://sdn.geekzu.org/avatar/dc07d89f89e35639443760d48c43015e?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/3028/" rel="nofollow" title="查看environ的档案">
               environ
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               程序并不能运行呀，有没有高手帮忙解决一下？
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-237920">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年11月17日 上午8:22
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8576/#post-237920">
               8 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-237920 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-8576 bbp-reply-position-8 user-id-1 post-237920 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/1/" rel="nofollow" title="查看谢益辉的档案">
               <img src="http://sdn.geekzu.org/avatar/1022d8e6ebc94e8f6bca9a86cebe312a?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/1/" rel="nofollow" title="查看谢益辉的档案">
               谢益辉
              </a>
              <br/>
              <div class="bbp-author-role">
               站长
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               问题没写清楚，你的程序哪里出错了还是怎么了？
              </p>
              <p>
               另外代码也写得非常啰嗦，完全没必要那样。
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
           </li>
           <!-- .bbp-body -->
           <li class="bbp-footer">
            <div class="bbp-reply-author">
             作者
            </div>
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-footer -->
          </ul>
          <!-- #topic-8576-replies -->
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 8 个帖子 - 1 到 8（总计 8 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <div class="bbp-no-reply" id="no-reply-8576">
           <div class="bbp-template-notice">
            <p>
             您必须先登录才能回复该主题。
            </p>
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
       <div class="comments-area" id="comments">
       </div>
       <!-- #comments -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>